var gUserData = JSON.parse(sessionStorage.wsUserLoginResult),
    // wsUrl="ws://www.smarteacup.cn/webSocket/websocket",
    wsUrl = "ws://localhost:8080/websocket",
    lockReconnect = false;
$(function () {
    $("#startBtn").on("click", function () {
        var isConnect = false;
        createWebSocket(wsUrl);
    });
    $("#sendBtn").on("click", function () {
        if (ws) {
            cleanDto();
            sendMessage.content = $("#sendMessage").val();
            sendMessage.userAccount = gUserData.userAccount;
            sendMessage.type = "groupList";
            ws.send(JSON.stringify(sendMessage));
        }
    });
    $("#closeBtn").on("click", function () {
        if (ws) {
            lockReconnect = true;
            ws.close();
        }
    })
});

